package com.nsoft.server.master.beans;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.nsoft.server.register.beans.GcHeader;

@Entity
@Table(name = "vehicle_master")
public class VehicleMaster implements Serializable {
	/*@EmbeddedId
	private VehicleMasterPK pk;*/
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name="veh_num_id")
	private int vehNumId;

	@Column(name="veh_char_regno")
	private String vehCharRegno;

	@Column(name = "veh_char_make")
	private String vehCharMake;

	@Column(name = "veh_char_owner")
	private String vehCharOwner;

	@Column(name = "veh_char_model")
	private String vehCharModel;

	@Column(name = "veh_date_regdate")
	private Date vehDateRegdate;

	@Column(name = "veh_num_tonnage")
	private int vehNumTonnage;

	@Column(name = "veh_char_insurance")
	private String vehCharInsurance;

	@Column(name = "veh_date_insurexpiry")
	private Date vehDateInsurexpiry;

	@ManyToOne(fetch = FetchType.LAZY, optional = false)
	 @JoinColumn(name = "veh_num_billingPartyId") 
	/*@JoinColumns( { @JoinColumn(name = "vehNumBillingpartyid", 
			referencedColumnName = "partyNumId")/* ,
			@JoinColumn(nullable=false, name="Party_char_Name"),
			@JoinColumn(nullable=false, name="Party_char_TAN"),
			@JoinColumn(nullable=false, name="Party_char_TIN"),
			@JoinColumn(nullable=false, name="Party_char_exim"),
			@JoinColumn(nullable=false, name="Party_char_PAN")*/
			//,insertable = false, updatable = false)
				//})
	private PartyMaster party;

	/*

	@Column(name="veh_num_billingPartyId") 
	private int vehNumBillingpartyid;
	 

	public int getVehNumBillingpartyid() {
		return vehNumBillingpartyid;
	}

	public void setVehNumBillingpartyid(int vehNumBillingpartyid) {
		this.vehNumBillingpartyid = vehNumBillingpartyid;
	}*/
	@Column(name = "veh_char_lastDriver")
	private String vehCharLastdriver;

	@Column(name = "veh_char_driverlicense")
	private String vehCharDriverlicense;

	@Column(name = "veh_char_general1")
	private String vehCharGeneral1;

	@Column(name = "veh_char_general2")
	private String vehCharGeneral2;

	@Column(name = "veh_char_general3")
	private String vehCharGeneral3;

	@Column(name = "veh_char_general4")
	private String vehCharGeneral4;

	@Column(name = "veh_char_general5")
	private String vehCharGeneral5;
	
	public Set<GcHeader> getLorryGc() {
		return lorryGc;
	}

	public void setLorryGc(Set<GcHeader> lorryGc) {
		this.lorryGc = lorryGc;
	}

	@OneToMany(mappedBy="lorryVechileMaster")
	private Set<GcHeader> lorryGc;
	

	private static final long serialVersionUID = 1L;

	public VehicleMaster() {
		super();
	}

	/*public VehicleMasterPK getPk() {
		return this.pk;
	}

	public void setPk(VehicleMasterPK pk) {
		this.pk = pk;
	}
*/
	public String getVehCharMake() {
		return this.vehCharMake;
	}

	public int getVehNumId() {
		return vehNumId;
	}

	public void setVehNumId(int vehNumId) {
		this.vehNumId = vehNumId;
	}

	public String getVehCharRegno() {
		return vehCharRegno;
	}

	public void setVehCharRegno(String vehCharRegno) {
		this.vehCharRegno = vehCharRegno;
	}

	public void setVehCharMake(String vehCharMake) {
		this.vehCharMake = vehCharMake;
	}

	public String getVehCharOwner() {
		return this.vehCharOwner;
	}

	public void setVehCharOwner(String vehCharOwner) {
		this.vehCharOwner = vehCharOwner;
	}

	public String getVehCharModel() {
		return this.vehCharModel;
	}

	public void setVehCharModel(String vehCharModel) {
		this.vehCharModel = vehCharModel;
	}

	public Date getVehDateRegdate() {
		return this.vehDateRegdate;
	}

	public void setVehDateRegdate(Date vehDateRegdate) {
		this.vehDateRegdate = vehDateRegdate;
	}

	public int getVehNumTonnage() {
		return this.vehNumTonnage;
	}

	public void setVehNumTonnage(int vehNumTonnage) {
		this.vehNumTonnage = vehNumTonnage;
	}

	public String getVehCharInsurance() {
		return this.vehCharInsurance;
	}

	public void setVehCharInsurance(String vehCharInsurance) {
		this.vehCharInsurance = vehCharInsurance;
	}

	public Date getVehDateInsurexpiry() {
		return this.vehDateInsurexpiry;
	}

	public void setVehDateInsurexpiry(Date vehDateInsurexpiry) {
		this.vehDateInsurexpiry = vehDateInsurexpiry;
	}

	/*
	 * public int getVehNumBillingpartyid() { return this.vehNumBillingpartyid;
	 * }
	 * 
	 * public void setVehNumBillingpartyid(int vehNumBillingpartyid) {
	 * this.vehNumBillingpartyid = vehNumBillingpartyid; }
	 */

	public String getVehCharLastdriver() {
		return this.vehCharLastdriver;
	}

	public PartyMaster getParty() {
		return party;
	}

	public void setParty(PartyMaster party) {
		this.party = party;
	}

	public void setVehCharLastdriver(String vehCharLastdriver) {
		this.vehCharLastdriver = vehCharLastdriver;
	}

	public String getVehCharDriverlicense() {
		return this.vehCharDriverlicense;
	}

	public void setVehCharDriverlicense(String vehCharDriverlicense) {
		this.vehCharDriverlicense = vehCharDriverlicense;
	}

	public String getVehCharGeneral1() {
		return this.vehCharGeneral1;
	}

	public void setVehCharGeneral1(String vehCharGeneral1) {
		this.vehCharGeneral1 = vehCharGeneral1;
	}

	public String getVehCharGeneral2() {
		return this.vehCharGeneral2;
	}

	public void setVehCharGeneral2(String vehCharGeneral2) {
		this.vehCharGeneral2 = vehCharGeneral2;
	}

	public String getVehCharGeneral3() {
		return this.vehCharGeneral3;
	}

	public void setVehCharGeneral3(String vehCharGeneral3) {
		this.vehCharGeneral3 = vehCharGeneral3;
	}

	public String getVehCharGeneral4() {
		return this.vehCharGeneral4;
	}

	public void setVehCharGeneral4(String vehCharGeneral4) {
		this.vehCharGeneral4 = vehCharGeneral4;
	}

	public String getVehCharGeneral5() {
		return this.vehCharGeneral5;
	}

	public void setVehCharGeneral5(String vehCharGeneral5) {
		this.vehCharGeneral5 = vehCharGeneral5;
	}

}
